package com.atguigu.gulimall.auth.feign;

import com.atguigu.common.to.SocialUser;
import com.atguigu.common.utils.R;
import com.atguigu.gulimall.member.vo.MemberLoginVo;
import com.atguigu.gulimall.member.vo.MemberRegisterVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient("gulimall-member")
public interface MemberFeignService {
    @RequestMapping("/member/member/register")
    R register(@RequestBody MemberRegisterVo registerVo);

    @RequestMapping("/login")
    public R login(@RequestBody MemberLoginVo loginVo);

    @PostMapping("/member/member/oauth2/login")
    R SocialLogin(@RequestBody SocialUser vo) throws Exception;
}
